package jp.seraph.jsade.model.nao;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import jp.seraph.jsade.model.JointIdentifier;
import jp.seraph.jsade.model.JointIdentifierContainer;

/**
 * Nao用JointIdentifierContainer実装
 */
public class NaoJointIdentifierContainer implements JointIdentifierContainer {
    public NaoJointIdentifierContainer(){
        mIdentifiers = new ArrayList<JointIdentifier>();
        for (NaoJointIdentifier tIdentifier : NaoJointIdentifier.getIdentifiers()) {
            mIdentifiers.add(tIdentifier);
        }
    }
    
    private List<JointIdentifier> mIdentifiers;

    
    public JointIdentifier getIdentifier(String jointName) {
        return NaoJointIdentifier.getJointIdentifier(jointName);
    }

    
    public List<JointIdentifier> getIdentifiers() {
        return new ArrayList<JointIdentifier>(mIdentifiers);
    }

    
    public Iterator<JointIdentifier> iterator() {
        return mIdentifiers.iterator();
    }
}
